package cn.highedu.component;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class ApplicationRunnerDemo implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        args.getOptionNames().forEach(optionName -> {
            System.out.println("ApplicationRunner.run " +
                    optionName + "=" + args.getOptionValues(optionName));
        });
    }
}
